{% extends 'mainindex.html' %}

{% block css %}
    <link href="/static/maincss/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
{% endblock %}
{% block content %}


    <div class="wrapper wrapper-content animated fadeInRight">

        <!-- Panel Other -->
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>用户列表</h5>
                <div class="ibox-tools">

                </div>
            </div>
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <!-- Example Events -->
                        <div class="example-wrap">
                                <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                                    <div style="margin-bottom: 10px">
                                        <a class="btn btn-success" href="/mainuser/list/add/">
                                            <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
                                            新建用户
                                        </a>
                                    </div>
                                </div>
                                <table id="exampleTableEvents" data-height="400" data-mobile-responsive="true">
                                    <thead>
                                        <tr>
                                            <th data-field="state" data-checkbox="true"></th>
                                            <th data-field="id">ID</th>
                                            <th data-field="name">姓名</th>
                                            <th data-field="pwd">密码</th>
                                            <th data-field="email">邮箱</th>
                                            <th data-field="phone">手机号</th>
                                            <th data-field="gender">性别</th>
                                            <th data-field="operate">操作</th>

                                        </tr>
                                    </thead>
                                    <tbody>
                                    {% for obj in queryset %}
                                        <tr>
                                            <td>{{ obj.id }}</td>
                                            <td>{{ obj.id }}</td>

                                            <td>{{ obj.username }}</td>
                                            <td>{{ obj.password }}</td>
                                            <td>{{ obj.email }}</td>
                                            <td>{{ obj.phone }}</td>
                                            <td>{{ obj.get_gender_display }}</td>
                                            <td>
                                                <a class="btn btn-primary btn-xs" href="/mainuser/{{ obj.id }}/list/edit/">编辑</a>
                                                <a class="btn btn-danger btn-xs" href="/mainuser/{{ obj.id }}/list/delete/">删除</a>
                                            </td>

                                        </tr>
                                    {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <!-- End Example Events -->
                        <div class="clearfix">
                            <ul class="pagination">
                                {{ page_string }}
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Panel Other -->
    </div>
{% endblock %}

{% block js %}
    <script src="/static/mainjs/content.js?v=1.0.0"></script>
     <!-- Bootstrap table -->
    <script src="/static/mainjs/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/static/mainjs/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="/static/mainjs/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>

    <!-- Peity -->
    <script src="/static/mainjs/demo/bootstrap-table-demo.js"></script>

{% endblock %}






